import {
	createStore
} from 'vuex'

const store = createStore({
	state: {
		userinfo: uni.getStorageSync('userinfo') || {}, //用户信息
		invitation_code: '',//分享邀请码,
		shareId: "",//小程序分享推荐用户id
		isShare: true,//是否触发分享.防止预览图片调用onshow事件引发的参数堆叠
		salonid: null,
		otherid: null
	},
	mutations: {
		ShareId: (state, shareId) => {
			state.shareId = shareId;
		},
		InvitationCode: (state, invitation_code) => {
			state.invitation_code = invitation_code;
		},
		IsShare:(state, isShare) => {
			state.isShare = isShare;
		},
		salonid:(state, salonid) => {
			state.salonid = salonid;
		},
		otherid:(state, otherid) => {
			state.otherid = otherid;
		},
	},
	actions: {
		
	},
	getters: {
		
	},
	modules: {

	}
})

export default store